<template>
  <div>
    <!-- 面包导航 -->
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/admin' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>图书管理</el-breadcrumb-item>
      <el-breadcrumb-item>图书列表</el-breadcrumb-item>
      <el-breadcrumb-item>章节列表</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- 卡片视图区域 -->
    <el-card style="margin-left:-1rem;margin-top:1rem">
      <!-- <el-row :gutter="20">
        <el-col :span="8">
          <el-input placeholder="请输入内容" clearable @clear="getUserList">
            <el-button slot="append" icon="el-icon-search" @click="getUserList()"></el-button>
          </el-input>
        </el-col>
        <el-col :span="4">
          <el-button type="primary" @click="addVisibl()">添加图书</el-button>
        </el-col>
      </el-row> -->

      <!-- 图书列表区域 -->
      <el-table :data="userlist" border stripe style="margin-top:1rem">
        <el-table-column label="＃" type="index"></el-table-column>
        <el-table-column label="内容简介"  prop="namebook"></el-table-column>
     
        <el-table-column label="操作" width="80px">
          <template slot-scope="scope"> 
            <el-button type="primary" icon="el-icon-edit" size="mini"></el-button>
            <!-- <el-button type="danger" @click="open" icon="el-icon-delete" size="mini"></el-button> -->
            <!-- <el-button type="success" size="mini" plain @click="addzj(scope.row.time)">添加章节</el-button>
            <el-button type="success" size="mini" plain @click="addzjlb(scope.row.time)">章节列表</el-button> -->
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>    

<script>
import { setToken, setUserName } from "../../utils/auth";
import request from "../../utils/request";
export default {
  data(){
    return{
      userlist:[],
      id:''
      }
    },


  created() {
    this.getUserList()
  },
  methods: {
     getUserList() {
     let time = this.$route.query.id;
     request({
        url: "/api/user/getAdminbookslst",
        method: "post",
        data: {id:time}
      }).then(res => {
        console.log(res)
       this.userlist = res.list;
        
      });
   
    }
  }
}
</script>

<style lang="less" scoped>
</style>